package com.itheima.web.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

//配置数据层注解
@Controller
//一级请求路径
@RequestMapping("/user")
public class UserController {
    //二级路径
    @RequestMapping(value = "/findAll", method = RequestMethod.GET)
    public String findAll() {
        System.out.println("查询所有");
        //返回视图结果
//        1.重定向
//        return "success";
//        return "forward:success.jsp";
         return "error";
    }
    @RequestMapping("/update")
    public String update(){
        System.out.println("update...");
        return "success";
    }
}
